#pragma once

#include <QtGui/QFrame.h>
#include <QtGui/QSpinBox.h>
#include "WaveForm.h"
#include "QWaveFormView.h"
#include "QSpectrumView.h"

class QAppMainWindow : public QFrame, ISampleWindowListener
{ 
	Q_OBJECT

public:
	QAppMainWindow( QWidget* _parent );

private slots:
	void					SetSampleWindowWidth( int width );
	void					SetSampleWindowPosition( int position );

	void					buttonPressed();
private:
	static void				filterFFTBins( std::size_t minBin, std::size_t maxBin, WaveForm::FFTBins& fftBins );
	virtual void			sampleWindowChanged( SampleWindow* sampleWindow );

	WaveForm*				mWaveForm;
	SampleWindow*			mWaveFormWindow;

	QWaveFormView*			mWaveFormView;
	QSpectrumView*			mSpectrumView;
	SampleWindow			mSampleWindow;
	
	QSpinBox*				mSampleWindowWidthSpinBox;
	QSpinBox*				mSampleWindowPositionSpinBox;


	WaveForm*				mOtherWaveForm;
	SampleWindow*			mOtherWaveFormWindow;
	QWaveFormView*			mOtherWaveFormView;
};
